searchForTerm
Function
searchForTerm(searchTerm,enableLiveUpdates)
Description
Searches for a term within the file manifest. Returns an array of file objects.
If isFinished is false search is not complete and it is only an update. When search is finished isFinished will be true.
Arguments
-
searchTerm, the term to search for. Title, long description, short description are searched and depending on user settings the actual file contents can be searched as well
-
enableLiveUpdates - When this is true, then as results are found notifications are made
Returns
-
success - This is a boolean that indicates whether the function was successful or not
-
error - If the function was unsuccessful, then details on the error are returned here
-
isFinished, when false it is only an update and search is not complete
-
files, this is an array of file objects. Below is a sample file object
{
"allowedOrientations" : 15,
"annotationPermission" : 0,
"areAnnotationsForFilePublic" : 0,
"canEmail" : 0,
"canFilePaint" : 0,
"canFileUseOpenWith" : 0,
"canPrintFile" : 0,
"checkSum" : 32669,
"customFilePath" : 0,
"deleted" : 0,
"downloadDate" :"2013-08-06 03:58:12 +0000",
"downloaded" : 1,
"durationViewed" : 0,
"editable" : 0,
"encrypted" : 0,
"expireDate" :"2014-08-06 06:59:59 +0000",
"favorite" : 0,
"fileId" : 105858,
"filePath" : "/var/mobile/Applications/487CC24A-D92C-434F-99FE-641CFA6DF697/Documents/files/105858.html",
"fileSize" : 405,
"fileSizeFromManifest" : 405,
"hasUpgradedEncryption" : 0,
"integrityCheckType" : 0,
"isFileEncrypted" : 0,
"isFileNew" : 0,
"isFileRead" : 1,
"isManual" : 0,
"isThumbDownloaded" : 0,
"isValidEncryptionState" : 1,
"localFileName" :"105858.html",
"loggingEnabled" : 1,
"manualDownloadActive" : 0,
"maxViewCountAllowed" : 0,
"maxViewDuration" : 0,
"nonVabletLinksInFileOpenExternally" : 0,
"notesEnabled" : 0,
"possessionTime" : 0,
"printable" : 0,
"realFileName" :"JSFunctionTests.html",
"smallThumbPath" : "/var/mobile/Applications/487CC24A-D92C-434F-99FE-641CFA6DF697/Documents/files/small_thumb_105858.html",
"startDate" :"2013-08-04 07:00:00 +0000",
"thumbHasFailed" : 0,
"thumbPath" : "/var/mobile/Applications/487CC24A-D92C-434F-99FE-641CFA6DF697/Documents/files/thumb_105858.html",
"thumb_url" :"https://vabletmedia.blob.core.windows.net/default/web.png",
"title" : JSFunctionTests,
"uploaded" : 0,
"url" :"secure://105858",
"viewCount" : 10,
"whenToDisplaySurvey" : 0
}